<template>
  <van-swipe class="detail-banner" :autoplay="3000" indicator-color="white">
    <van-swipe-item v-for="(banner, index) in list" :key="index">
      <van-image lazy-load width="100%" :src="banner" />
    </van-swipe-item>
  </van-swipe>
</template>
<script>
import Vue from 'vue'
import { Swipe, SwipeItem, Image as VanImage, Lazyload } from 'vant'

Vue.use(Swipe)
Vue.use(SwipeItem)
Vue.use(VanImage)
Vue.use(Lazyload)
export default {
  props: ['list']
}
</script>
<style lang="scss" scoped>
.detail-banner {
  height: 2rem;
  overflow: hidden;
  .van-swipe-item {
    background-color: #ededed;
  }
}
</style>
